package lab01;

public class Test13 {
        public static void main(String[] args) {
            int a=0,b=0,c=0,count=0;
            int i=100;
            int sum=0;

            while(i<1000){
                a=i%10;b=(i%100-i%10)/10;c=i/100;
                if(i==a*a*a+b*b*b+c*c*c){
                    System.out.println("n是水仙花数，n= "+i);
                    sum=sum+i;
                    count++;
                }
                i++;

            }
            System.out.println("水仙花个数："+count);
            System.out.println("水仙花数和："+sum);
        }
    }


